package com.ciwong.epaper.modules.dbbean;

import com.ciwong.epaper.modules.epaper.bean.RecordSubmitPart;
import com.ciwong.mobilelib.bean.BaseBean;

import java.util.List;

/**
 * Created by Administrator on 2017/2/17.
 */
public class LswAnswer extends BaseBean {


    private static final long serialVersionUID = -2955626732915536861L;
    /**
     * 上传状态:上传中
     */
    public static final int UPLOADING = 2;

    /**
     * 上传状态:上传成功
     */
    public static final int SUCCESS = 1;


    /**
     * 上传状态:上传中
     */
    public static final int FAIL = 0;


    //学生每个作业id   userid+ BookId+chapterId+parentVersionId+versionId+workId+uuid=0
    //标志一份作业的唯一标志
    private String workSaveUUid;

    //题目版本ID
    private String versionId;

    private String parentVersionId = "0";

    //当前题目作答用时
    private long workLong;

    //参考分值
    private float refScore;
    //用户答案列表和参考答案列表
    private List<AnswerContent> answerContents;

    //上传状态
    //SUCCESS 成功     FAIL  失败
    private int uploadState = FAIL;
    //MP3 网上地址
    private String mp3NetworkPath;


    private RecordSubmitPart recordSubmitPart;


    //答案类型(1:音频URL 2:选项ID 3:填空题答案)
    private int answerType;
    private int is_objective = 1;

    /**
     * 是否已经作答，选择题专用
     */
    private boolean isAnswer = true;

    /**
     *题型 （一个问题的类型）
     */
    private int qtype ;

    /**
     * 大题编号 从1开始
     */
    private int bigQuesIndex;

    /**
     * 总小题数
     */
    private int totalQuesIndex;

    /**
     *（题目编号1.x.y.z）
     */
    private String quesNo;
    /**
     * 作业id
     */
    private String doWorkId;

    public String getDoWorkId() {
        return doWorkId;
    }

    public void setDoWorkId(String doWorkId) {
        this.doWorkId = doWorkId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public static int getUPLOADING() {
        return UPLOADING;
    }

    public static int getSUCCESS() {
        return SUCCESS;
    }

    public static int getFAIL() {
        return FAIL;
    }

    public int getBigQuesIndex() {
        return bigQuesIndex;
    }

    public void setBigQuesIndex(int bigQuesIndex) {
        this.bigQuesIndex = bigQuesIndex;
    }

    public int getTotalQuesIndex() {
        return totalQuesIndex;
    }

    public void setTotalQuesIndex(int totalQuesIndex) {
        this.totalQuesIndex = totalQuesIndex;
    }

    public String getQuesNo() {
        return quesNo;
    }

    public void setQuesNo(String quesNo) {
        this.quesNo = quesNo;
    }

    public int getQtype() {
        return qtype;
    }

    public void setQtype(int qtype) {
        this.qtype = qtype;
    }


    public int getIs_objective() {
        return is_objective;
    }

    public void setIs_objective(int is_objective) {
        this.is_objective = is_objective;
    }

    public int getAnswerType() {
        return answerType;
    }

    public void setAnswerType(int answerType) {
        this.answerType = answerType;
    }


    public void setRecordSubmitPart(RecordSubmitPart recordSubmitPart) {
        this.recordSubmitPart = recordSubmitPart;
    }

    public RecordSubmitPart getRecordSubmitPart() {
        return recordSubmitPart;
    }

    public List<AnswerContent> getAnswerContents() {
        return answerContents;
    }

    public void setAnswerContents(List<AnswerContent> answerContents) {
        this.answerContents = answerContents;
    }


    public String getWorkSaveUUid() {
        return workSaveUUid;
    }

    public void setWorkSaveUUid(String workSaveUUid) {
        this.workSaveUUid = workSaveUUid;
    }

    public String getMp3NetworkPath() {
        return mp3NetworkPath;
    }

    public void setMp3NetworkPath(String mp3NetworkPath) {
        this.mp3NetworkPath = mp3NetworkPath;
    }


    public int getUploadState() {
        return uploadState;
    }

    public void setUploadState(int uploadState) {
        this.uploadState = uploadState;
    }


    public String getVersionId() {
        return versionId;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }


    public long getWorkLong() {
        return workLong;
    }

    public void setWorkLong(long workLong) {
        this.workLong = workLong;
    }


    public float getRefScore() {
        return refScore;
    }

    public void setRefScore(float refScore) {
        this.refScore = refScore;
    }

    public void setParentVersionId(String parentVersionId) {
        this.parentVersionId = parentVersionId;
    }

    public String getParentVersionId() {
        return parentVersionId;
    }

    public boolean isAnswer() {
        return isAnswer;
    }

    public void setAnswer(boolean answer) {
        isAnswer = answer;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        LswAnswer other = (LswAnswer) obj;
        boolean equals = getVersionId().equals(other.getVersionId());
        if (equals)
            return true;
       else
            return false;
    }
}
